﻿using System.ComponentModel.DataAnnotations;

namespace WMS_MAV.DTO.Warehouse.Storage
{
    public class AddStorageDTO
    {
        public int StorageId { get; set; }
        /// <summary>
        /// 入库单号
        /// </summary>
        public string? StorageNo { get; set; }
        /// <summary>
        /// 入库单类型
        /// </summary>
        public string? StorageType { get; set; }
        /// <summary>
        /// 关联订单号
        /// </summary>
        public string? AssociateNumber { get; set; }
        /// <summary>
        /// 供应商编号
        /// </summary>
        public string? VendorNo { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>
        public string? VendorName { get; set; }
        /// <summary>
        /// 供应商联系人
        /// </summary>
        public string? VendorContact { get; set; }
        /// <summary>
        /// 供应商联系方式
        /// </summary>
        public string? VendorPhone { get; set; }
        /// <summary>
        /// 制单人
        /// </summary>
        public string? SingleMaker { get; set; }
        /// <summary>
        /// 制单时间
        /// </summary>
        public DateTime? SingleTime { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string? StorageRemarks { get; set; }
        /// <summary>
        /// 入库状态
        /// </summary>
        public AuditStatus? StorageStatus { get; set; }
        /// <summary>
        /// 审核原因
        /// </summary>
        public string? ExamineReason { get; set; }
        /// <summary>
        /// 审核人
        /// </summary>
        public string? ExaminePeople { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? ExamineTime { get; set; }

        /// <summary>
        /// 公司Id
        /// </summary>
        public string? office_id { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        public int? user_id { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreateName { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdateName { get; set; }
        public List<StorageProducts> StorageProducts { get; set; }
    }
    public enum AuditStatus
    {
        全部 = 0,
        等待审核,
        审核成功,
        审核失败
    }
    public class StorageProducts
    {
        /// <summary>
        /// 入库产品信息id
        /// </summary>
        [Key]
        public int StorageProductsId { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public string? ProductName { get; set; }
        /// <summary>
        /// 产品编码
        /// </summary>
        public string? ProductNo { get; set; }
        /// <summary>
        /// 规格
        /// </summary>
        public string? ProductSpec { get; set; }
        /// <summary>
        /// 批次
        /// </summary>
        public string? Batch { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal? Price { get; set; }
        /// <summary>
        /// 入库数
        /// </summary>
        public int? StorageNum { get; set; }
        /// <summary>
        /// 总价
        /// </summary>
        public decimal? TotalPrice { get; set; }
        /// <summary>
        /// 库位
        /// </summary>
        public string? BinLocationName { get; set; }
        /// <summary>
        /// 公司Id
        /// </summary>
        public string? office_id { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        public int? user_id { get; set; }
        /// <summary>
        /// 入库id
        /// </summary>
        public int? StorageId { get; set; }
    }
}
